<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>星期几</title>
    <script>
        //根据用户输入的数字，打印星期几

        var week = +prompt('请输入数字');

        switch (week) {
            case 1:
                alert('星期一');
                break;
            case 2:
                alert('星期二');
                break;
            case 3:
                alert('星期三');
                break;
            case 4:
                alert('星期四');
                break;
            case 5:
                alert('星期五');
                break;
            case 6:
                alert('星期六');
                break;
            case 7:
                alert('星期日');
                break;
            default:
                alert('您输入的数字有误');
                break;
        }



    </script>
</head>
<body>

</body>
</html>